home *** CD-ROM | disk | FTP | other *** search
- import java.awt.*;
- import java.awt.Button;
- import java.awt.Frame;
- import java.awt.Insets;
- import java.awt.Label;
- import java.awt.FlowLayout;
- import java.net.URL;
- import symantec.itools.multimedia.ImageViewer;
- import symantec.itools.awt.util.dialog.ModalDialog;
-
- public class AttentionDialog extends ModalDialog {
-
- public AttentionDialog(Frame parent, String title, String message, URL iconURL) {
- super(parent, title);
-
- //{{INIT_CONTROLS
- setLayout(new FlowLayout(FlowLayout.LEFT,5,5));
- addNotify();
- resize(insets().left + insets().right + 270,insets().top + insets().bottom + 73);
- label1 = new java.awt.Label("");
- label1.reshape(insets().left + 5,insets().top + 5,14,21);
- add(label1);
- okButton = new java.awt.Button("OK");
- okButton.reshape(insets().left + 24,insets().top + 5,26,21);
- add(okButton);
- setTitle("");
- //}}
-
- label1.setText(message);
- if (iconURL != null) {
- ImageViewer img = new ImageViewer(iconURL);
- add(img);
- }
- }
-
- public AttentionDialog(Frame parent) {
- this(parent, "Attention", "Event", null);
- }
-
- // Add a constructor for Interactions (ignoring modal)
- public AttentionDialog(Frame parent, boolean modal) {
- this(parent);
- }
-
- // Add a constructor for Interactions (ignoring modal)
- public AttentionDialog(Frame parent, String message, boolean modal) {
- this(parent, "Attention", message, null);
- }
-
- //{{DECLARE_CONTROLS
- java.awt.Label label1;
- java.awt.Button okButton;
- //}}
- }
-
-